<html>
<head><meta charset="utf-8"><title>Name{Ref}Class::classify_self · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Name.7BRef.7DClass.3A.3Aclassify_self.html">Name{Ref}Class::classify_self</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222496007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Name%7BRef%7DClass%3A%3Aclassify_self/near/222496007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Name.7BRef.7DClass.3A.3Aclassify_self.html#222496007">(Jan 12 2021 at 21:19)</a>:</h4>
<p>Wanted to look into enabling hover hints for <code>self</code> and was wondering whether it would make sense to add a <code>Name{Ref}Class::classify_self</code> function, the downside here is that the function for NameRefClass would have to accept a SyntaxToken since there is no special <code>self</code> ast node(NameClass doesn't have that problem since there is a <code>SelfParam</code> node).<br>
This would also allow us to reimplement reference search for <code>self</code>(I think at least) the same way it works for names and lifetimes(currently the search is special cased in the reference module).</p>



<a name="222509369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Name%7BRef%7DClass%3A%3Aclassify_self/near/222509369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Name.7BRef.7DClass.3A.3Aclassify_self.html#222509369">(Jan 12 2021 at 23:10)</a>:</h4>
<p>Well I went ahead and tried it out to see how things will change and it looked pretty good in my eyes so I went aehead and just finished it. <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7261">https://github.com/rust-analyzer/rust-analyzer/pull/7261</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>